package cn.com.surker.production.entity;

import cn.com.surker.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 运输合同补贴表
 * </p>
 *
 * @author admin
 * @since 2024-12-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ProductionTransportSubsidy extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 公司ID
     */
    private Long orgId;

    /**
     * 合同ID
     */
    private Long contractId;

    /**
     * 生效时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date takeTime;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd hh:mm:ss")
    private Date expireTime;

    /**
     * 运输类型,正常运输,转料,返料,水车,砂浆,超时
     */
    private Integer tranType;

    /**
     * 计算方式,分为按照运输方量,车次等
     */
    private Integer countType;

    /**
     * 计算方式(0:补差量计算,1:实际量计算,2:按次计算,3:全量计算)
     */
    private Integer calcType;
    /**
     * 道路类型,分为高速和国道,关联枚举RoadTypeEnum
     */
    private Integer roadType;

    /**
     * 是否途径超限站
     */
    private Integer overLimit;
    /**
     * 车辆类型
     */
    private Integer carModel;

    /**
     * 区间最小值,用于计算区间补贴的间最小值,必填
     */
    private Double minValue;

    /**
     * 单价
     */
    private Double price;

    /**
     * 单价类型 0：补贴 1：运输价
     */
    private Integer priceType;

    /**
     * 含税单价
     */
    private Double taxPrice;

    public ProductionTransportSubsidy(){}

    public ProductionTransportSubsidy(Long orgId, Long contractId, Date takeTime, Integer tranType, Integer carModel, Integer countType, Integer roadType, Integer overLimit, Double minValue, Double price) {
        this.orgId = orgId;
        this.contractId = contractId;
        this.takeTime = takeTime;
        this.tranType = tranType;
        this.countType = countType;
        this.carModel = carModel;
        this.roadType = roadType;
        this.overLimit = overLimit;
        this.minValue = minValue;
        this.price = price;
    }
}
